const express = require('express');
const router = express.Router();

router.all('/login', (req, res) => {
    console.log(req.query)
    let emnum = req.query.emnum
    let mobileId = req.query.mobileId
    let res_body = {}
    if(emnum.length>8){
        res_body = {
            "status": 101,
            "msg": "登录失败",
            "emnum" : emnum,
            "comment":"login error!"
        }
    }else{
        res_body = {
            "status": 0,
            "msg": "成功",
            "fn":"杨","ln":"建宇",
            "emnum" :'06061647',
            "department":"30",
            "crew":"B"
        }
    }
    res.json(
        res_body
    );
});

module.exports = router;

